'\" t
.\"     Title: makechrootpkg
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.23
.\"      Date: 2024-06-18
.\"    Manual: \ \&
.\"    Source: \ \&
.\"  Language: English
.\"
.TH "MAKECHROOTPKG" "1" "2024-06-18" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
makechrootpkg \- Build a PKGBUILD in a given chroot environment
.SH "SYNOPSIS"
.sp
makechrootpkg [OPTIONS] \-r <chrootdir> [\-\-] [makepkg args]
.SH "DESCRIPTION"
.sp
Run this script in a directory containing a PKGBUILD to build a package
inside a clean chroot. Arguments passed to this script after the
end\-of\-options marker (\-\-) will be passed to makepkg.
.sp
The chroot dir consists of the following directories:
<chrootdir>/{root, copy} but only "root" is required
by default. The working copy will be created as needed
.sp
The chroot "root" directory must be created via the following
command:
mkarchroot <chrootdir>/root base\-devel
.sp
This script reads {SRC,SRCPKG,PKG,LOG}DEST, MAKEFLAGS and PACKAGER
from makepkg.conf(5), if those variables are not part of the
environment.
.sp
Default makepkg args: \-\-syncdeps \-\-noconfirm \-\-log \-\-holdver \-\-skipinteg
.SH "OPTIONS"
.sp
\fB\-h\fP
.RS 4
Show this usage message
.RE
.sp
\fB\-c\fP
.RS 4
Clean the chroot before building
.RE
.sp
\fB\-d\fP <dir>
.RS 4
Bind directory into build chroot as read\-write
.RE
.sp
\fB\-D\fP <dir>
.RS 4
Bind directory into build chroot as read\-only
.RE
.sp
\fB\-t\fP <dir>[:opts]
.RS 4
Mount a tmpfs at \fIdir\fP. See the \fI\-\-tmpfs\fP argument in systemd\-nspawn(1) for more details.
.RE
.sp
\fB\-u\fP
.RS 4
Update the working copy of the chroot before building
This is useful for rebuilds without dirtying the pristine
chroot
.RE
.sp
\fB\-r\fP <dir>
.RS 4
The chroot dir to use
.RE
.sp
\fB\-I\fP <pkg>
.RS 4
Install a package into the working copy of the chroot
.RE
.sp
\fB\-l\fP <copy>
.RS 4
The directory to use as the working copy of the chroot
Useful for maintaining multiple copies
Default: $USER
.RE
.sp
\fB\-n\fP
.RS 4
Run namcap on the build package
.RE
.sp
\fB\-C\fP
.RS 4
Run checkpkg on the build package
.RE
.sp
\fB\-T\fP
.RS 4
Build in a temporary directory
.RE
.sp
\fB\-U\fP
.RS 4
Run makepkg as a specified user
.RE
.sp
\fB\-x\fP <when>
.RS 4
Inspect chroot after build, possible modes are \fInever\fP (default), \fIalways\fP or \fIfailure\fP
.RE
.SH "SEE ALSO"
.sp
systemd\-nspawn(1)
.SH "HOMEPAGE"
.sp
\fI\c
.URL "https://gitlab.archlinux.org/archlinux/devtools" "" "\fP"
.sp
Please report bugs and feature requests in the issue tracker. Please do your best to provide a reproducible test case for bugs.